<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


<%@page import="java.util.Enumeration"%>
<%@page import="domain.util.Filler"%>
<%@page import="domain.Query"%>
<%@page import="java.util.List"%>
<%@page import="facade.Facade"%>
<html>
<head>
<script type="text/javascript">
function preenche_campos() {
	<% if (session.getAttribute("record") != null && session.getAttribute("query") != null) {
		Query query = (Query) session.getAttribute("query");
		int selected = Integer.parseInt(session.getAttribute("record").toString()); 
		String string = Facade.getInstance().search(query, selected);
		out.print(Filler.getJSFunction(string));
	}
	%>
	/*
	window.parent.document.getElementById('tag_003_subfield_00').value = ;
	$('#tag_245_subfield_a').val(get_url_param('titulo'));
	$('#tag_100_subfield_a').val(get_url_param('autor'));
	$('#tag_700_subfield_a').val(get_url_param('colaboradores'));
	$('#tag_250_subfield_a').val(get_url_param('edicao'));
	$('#tag_260_subfield_b').val(get_url_param('editora'));
	$('#tag_260_subfield_c').val(get_url_param('ano'));
	$('#tag_260_subfield_a').val(get_url_param('local'));
	$('#tag_020_subfield_a').val(get_url_param('isbn'));
	$('#tag_520_subfield_a').val(get_url_param('descricao'));
	$('#tag_650_subfield_a').val(get_url_param('assunto'));
	$('#tag_041_subfield_d').val(get_url_param('id'));
	$('#tag_044_subfield_a').val(get_url_param('pais'));
	$('#tag_003_subfield_00').val('arroz' + get_url_param('tombamento'));
	*/
}
</script>
</head>
<body>
<script type="text/javascript">preenche_campos();</script>
</body>
</html>